From: Richard M. Stallman Date: Tue, 17 May 1994 19:12:55 +0000 (+0000) Subject: (main): Avoid crash if argc is 1. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~91534 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=d410d33931f668b2d7a7c8ca5d2ccb82c850ab76;p=emacs.git (main): Avoid crash if argc is 1. --- diff --git a/lib-src/b2m.c b/lib-src/b2m.c index 2e321a1b1b7..46485946c02 100644 --- a/lib-src/b2m.c +++ b/lib-src/b2m.c @@ -50,7 +50,7 @@ main (argc, argv) (stdout)->_flag &= ~_IOTEXT; (stdin)->_flag &= ~_IOTEXT; #endif - if (strcmp (argv[1], "--help") == 0) + if (argc >= 2 && strcmp (argv[1], "--help") == 0) { fprintf (stderr, "Usage: %s unixmailbox\n", argv[0]); exit (0);